package com.gxa.jjty.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.validation.annotation.Validated;
import javax.persistence.*;
import java.sql.Timestamp;


/**
 * @author 雅风
 */
@Data
@NoArgsConstructor
@AllArgsConstructor

@Table(name = "phy_user") // 创建数据表的注解

@ApiModel("陪护员用户表")
@Validated
public class PhyUser {

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id")
  private Long id;

  @Column(name = "user_name")
  private String userName;

  @Column(name = "name",nullable = false)
  private String name;

  @Column(name = "password")
  @JsonIgnore
  private String password;

  @Column(name = "phone",unique = true,nullable = false)
  private String phone;

  @Column(name = "area")
  private String area;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Column(name = "reg_time",nullable = false)
  private Timestamp regTime;

  @Column(name = "state")
  private Boolean state;

  @Column(name = "bank")
  private String bank;

  @Column(name = "bank_card")
  private String bankCard;

  @Column(name = "payee")
  private String payee;

  @Column(name = "sequence")
  private Long sequence;

  @Column(name = "token")
  @JsonIgnore
  private String token;

  @Column(name = "order_sum")
  private Long orderSum;

  @Column(name = "today_order")
  private Long todayOrder;

  @Column(name = "server_state")
  private String serverState;

  @Column(name= "ability")
  private String ability;

  @Column(name= "distance")
  private String distance;

  @Column(name= "head_name")
  private String headName;

  @Column(name= "select_state")
  private Boolean selectState;

  @Column(name= "position")
  private  String position;

}
